<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN""http://www.w3.org/TR/REC-html40/loose.dtd">
<!--NewPage-->
<HTML>
<HEAD>
<TITLE>
JSJaCConnection
</TITLE>
<LINK REL ="stylesheet" TYPE="text/css" HREF="stylesheet.css" TITLE="Style">
</HEAD>
<SCRIPT>
function asd()
{
parent.document.title="JSJaCConnection";
}
</SCRIPT>
<BODY BGCOLOR="white" onload="asd();">

<!-- ========== START OF NAVBAR ========== -->
<A NAME="navbar_bottom"><!-- --></A>
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0">
<TR>
<TD COLSPAN=3 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
<A NAME="navbar_bottom_firstrow"><!-- --></A>
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3">
  <TR ALIGN="center" VALIGN="top">
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">  <A HREF="overview-summary-JSJaCConnection.js.html"><FONT CLASS="NavBarFont1"><B>File</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev">&nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="overview-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
  <!--TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"-->    <!--A HREF="deprecated-list.html"--><!--FONT CLASS="NavBarFont1">Deprecated</FONT--><!--/A--><!--&nbsp;</TD-->
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="index-all.html"--><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
  </TR>
</TABLE>
</TD>
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
<B>JSJaC</B>
</EM>
</TD
</TR>

<TR>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
&nbsp;<A HREF="GLOBALS.html"><B>PREV CLASS</B></A><!-- 
   NEXT CLASS 
-->
&nbsp;<A HREF="JSJaCConsoleLogger.html"><B>NEXT CLASS</B></A></FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
  <A HREF="index.html" TARGET="_top"><B>FRAMES</B></A>  &nbsp;
&nbsp;<A HREF="" TARGET="_top"><B>NO FRAMES</B></A>  &nbsp;
&nbsp;
<SCRIPT>
  <!--
  if(window==top) {
    document.writeln('<A HREF="allclasses-noframe.html" TARGET=""><B>All Classes</B></A>');
  }
  //-->
</SCRIPT>
<NOSCRIPT>
<A HREF="allclasses-noframe.html" TARGET=""><B>All Classes</B></A>
</NOSCRIPT>
</FONT></TD>
</TR>
<TR>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
  SUMMARY:&nbsp;<A HREF="#field_summary">FIELD</A>&nbsp;|&nbsp;<A HREF="#constructor_summary">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
DETAIL:&nbsp;<A HREF="#field_detail">FIELD</A>&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>
</TR>
</TABLE>
<!-- =========== END OF NAVBAR =========== -->
<HR>

<!-- ======== START OF CLASS DATA ======== -->
<H2>Class JSJaCConnection</H2>
<PRE>Object
   |
   +--<b>JSJaCConnection</b>
</PRE>

   
      <DL>
      <DT>
         <B>Direct Known Subclasses:</B> 
         <DD>
                  <a href='JSJaCHttpPollingConnection.html'>JSJaCHttpPollingConnection</a>, <a href='JSJaCHttpBindingConnection.html'>JSJaCHttpBindingConnection</a>
         </DD>
      </DL>
   


<HR>
<DL>
   <!-- Class definition -->
   <DT>class 
   <B>JSJaCConnection</B>
   

</DL>
   
   <P>
   <BR/>Somewhat abstract base class for jabber connections. Contains all
 of the code in common for all jabber connections
 <BR/><I>Defined in <a href='overview-summary-JSJaCConnection.js.html'>JSJaCConnection.js</a></I><BR/><BR/>
   </P>
   
   <HR>

<!-- ======== NESTED CLASS SUMMARY ======== -->

<!-- ======== END NESTED CLASS SUMMARY ======== -->


<!-- =========== FIELD SUMMARY =========== -->

   <A NAME="field_summary"><!-- --></A>
      <TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
         <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
            <TD COLSPAN=2><FONT SIZE="+2">
               <B>Field Summary</B></FONT></TD>
         </TR>

   <!-- This is one instance field summary -->
   
   <TR BGCOLOR="white" CLASS="TableRowColor">
   <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
   <CODE>&nbsp;Debugger</CODE></FONT></TD>
   <TD><CODE><B><A HREF="#oDbg">oDbg</A></B></CODE>
   <BR>
   &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Reference to debugger interface
(needs to implement method <code>log</code>)</TD>
   </TR>
   

   </TABLE>
   &nbsp;
   

   

<!-- =========== END FIELD SUMMARY =========== -->


<!-- ======== CONSTRUCTOR SUMMARY ======== -->

<A NAME="constructor_summary"><!-- --></A>
<TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TD COLSPAN=2><FONT SIZE="+2">
<B>Constructor Summary</B></FONT></TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
   <TD>
      <CODE>
	 <B>
	    <A HREF="#JSJaCConnection()">JSJaCConnection</A></B>(&lt;<a href="http://www.json.org/index.html">JSON</a>&gt; oArg)
      </CODE>
      <BR>
      &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
      Creates a new Jabber connection (a connection to a jabber server)
      </TD>
</TR>
</TABLE>

<!-- ======== END CONSTRUCTOR SUMMARY ======== -->

&nbsp;

<!-- ========== METHOD SUMMARY =========== -->

<A NAME="method_summary"><!-- --></A>
<TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TD COLSPAN=2><FONT SIZE="+2">
<B>Method Summary</B></FONT></TD>
</TR>


   <TR BGCOLOR="white" CLASS="TableRowColor">
      <TD ALIGN="right" VALIGN="top" WIDTH="1%">
	 <FONT SIZE="-1">
	    <CODE>&nbsp;void</CODE>
	 </FONT>
      </TD>
      <TD>
	 <CODE>
	    <B>
	       <A HREF="#connect">connect</A></B>(oArg)
	 </CODE>
	 <BR>
	 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
	 
      </TD>
   </TR>

   <TR BGCOLOR="white" CLASS="TableRowColor">
      <TD ALIGN="right" VALIGN="top" WIDTH="1%">
	 <FONT SIZE="-1">
	    <CODE>&nbsp;boolean</CODE>
	 </FONT>
      </TD>
      <TD>
	 <CODE>
	    <B>
	       <A HREF="#connected">connected</A></B>()
	 </CODE>
	 <BR>
	 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
	 Tells whether this connection is connected
      </TD>
   </TR>

   <TR BGCOLOR="white" CLASS="TableRowColor">
      <TD ALIGN="right" VALIGN="top" WIDTH="1%">
	 <FONT SIZE="-1">
	    <CODE>&nbsp;void</CODE>
	 </FONT>
      </TD>
      <TD>
	 <CODE>
	    <B>
	       <A HREF="#disconnect">disconnect</A></B>()
	 </CODE>
	 <BR>
	 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
	 Disconnects from jabber server and terminates session (if applicable)
      </TD>
   </TR>

   <TR BGCOLOR="white" CLASS="TableRowColor">
      <TD ALIGN="right" VALIGN="top" WIDTH="1%">
	 <FONT SIZE="-1">
	    <CODE>&nbsp;int</CODE>
	 </FONT>
      </TD>
      <TD>
	 <CODE>
	    <B>
	       <A HREF="#getPollInterval">getPollInterval</A></B>()
	 </CODE>
	 <BR>
	 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
	 Gets current value of polling interval
      </TD>
   </TR>

   <TR BGCOLOR="white" CLASS="TableRowColor">
      <TD ALIGN="right" VALIGN="top" WIDTH="1%">
	 <FONT SIZE="-1">
	    <CODE>&nbsp;void</CODE>
	 </FONT>
      </TD>
      <TD>
	 <CODE>
	    <B>
	       <A HREF="#registerHandler">registerHandler</A></B>(&lt;<a href="String.html">String</a>&gt; event)
	 </CODE>
	 <BR>
	 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
	 Registers an event handler (callback) for this connection.
      </TD>
   </TR>

   <TR BGCOLOR="white" CLASS="TableRowColor">
      <TD ALIGN="right" VALIGN="top" WIDTH="1%">
	 <FONT SIZE="-1">
	    <CODE>&nbsp;void</CODE>
	 </FONT>
      </TD>
      <TD>
	 <CODE>
	    <B>
	       <A HREF="#registerIQGet">registerIQGet</A></B>(&lt;<a href="String.html">String</a>&gt; childName, &lt;<a href="String.html">String</a>&gt; childNS, &lt;Function&gt; handler)
	 </CODE>
	 <BR>
	 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
	 Register for iq packets of type 'get'.
      </TD>
   </TR>

   <TR BGCOLOR="white" CLASS="TableRowColor">
      <TD ALIGN="right" VALIGN="top" WIDTH="1%">
	 <FONT SIZE="-1">
	    <CODE>&nbsp;void</CODE>
	 </FONT>
      </TD>
      <TD>
	 <CODE>
	    <B>
	       <A HREF="#registerIQSet">registerIQSet</A></B>(&lt;<a href="String.html">String</a>&gt; childName, &lt;<a href="String.html">String</a>&gt; childNS, &lt;Function&gt; handler)
	 </CODE>
	 <BR>
	 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
	 Register for iq packets of type 'set'.
      </TD>
   </TR>

   <TR BGCOLOR="white" CLASS="TableRowColor">
      <TD ALIGN="right" VALIGN="top" WIDTH="1%">
	 <FONT SIZE="-1">
	    <CODE>&nbsp;boolean</CODE>
	 </FONT>
      </TD>
      <TD>
	 <CODE>
	    <B>
	       <A HREF="#resume">resume</A></B>()
	 </CODE>
	 <BR>
	 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
	 Resumes this connection from saved state (cookie)
      </TD>
   </TR>

   <TR BGCOLOR="white" CLASS="TableRowColor">
      <TD ALIGN="right" VALIGN="top" WIDTH="1%">
	 <FONT SIZE="-1">
	    <CODE>&nbsp;boolean</CODE>
	 </FONT>
      </TD>
      <TD>
	 <CODE>
	    <B>
	       <A HREF="#send">send</A></B>(&lt;<a href="JSJaCPacket.html">JSJaCPacket</a>&gt; packet,&lt;Function&gt; cb,&lt;Object&gt; arg)
	 </CODE>
	 <BR>
	 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
	 Sends a JSJaCPacket
      </TD>
   </TR>

   <TR BGCOLOR="white" CLASS="TableRowColor">
      <TD ALIGN="right" VALIGN="top" WIDTH="1%">
	 <FONT SIZE="-1">
	    <CODE>&nbsp;boolean</CODE>
	 </FONT>
      </TD>
      <TD>
	 <CODE>
	    <B>
	       <A HREF="#sendIQ">sendIQ</A></B>(&lt;JSJaCIQPacket&gt; iq, &lt;Object&gt; handlers, &lt;Object&gt; arg)
	 </CODE>
	 <BR>
	 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
	 Sends an IQ packet.
      </TD>
   </TR>

   <TR BGCOLOR="white" CLASS="TableRowColor">
      <TD ALIGN="right" VALIGN="top" WIDTH="1%">
	 <FONT SIZE="-1">
	    <CODE>&nbsp;int</CODE>
	 </FONT>
      </TD>
      <TD>
	 <CODE>
	    <B>
	       <A HREF="#setPollInterval">setPollInterval</A></B>(timerval)
	 </CODE>
	 <BR>
	 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
	 Sets polling interval for this connection
      </TD>
   </TR>

   <TR BGCOLOR="white" CLASS="TableRowColor">
      <TD ALIGN="right" VALIGN="top" WIDTH="1%">
	 <FONT SIZE="-1">
	    <CODE>&nbsp;<a href="String.html">String</a></CODE>
	 </FONT>
      </TD>
      <TD>
	 <CODE>
	    <B>
	       <A HREF="#status">status</A></B>()
	 </CODE>
	 <BR>
	 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
	 Returns current status of this connection
      </TD>
   </TR>

   <TR BGCOLOR="white" CLASS="TableRowColor">
      <TD ALIGN="right" VALIGN="top" WIDTH="1%">
	 <FONT SIZE="-1">
	    <CODE>&nbsp;void</CODE>
	 </FONT>
      </TD>
      <TD>
	 <CODE>
	    <B>
	       <A HREF="#suspend">suspend</A></B>()
	 </CODE>
	 <BR>
	 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
	 Suspsends this connection (saving state for later resume)
      </TD>
   </TR>

   <TR BGCOLOR="white" CLASS="TableRowColor">
      <TD ALIGN="right" VALIGN="top" WIDTH="1%">
	 <FONT SIZE="-1">
	    <CODE>&nbsp;void</CODE>
	 </FONT>
      </TD>
      <TD>
	 <CODE>
	    <B>
	       <A HREF="#unregisterHandler">unregisterHandler</A></B>(event,handler)
	 </CODE>
	 <BR>
	 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
	 
      </TD>
   </TR>


</TABLE>



<P>
<!-- ========== END METHOD SUMMARY =========== -->


<!-- ============ FIELD DETAIL START =========== -->

   <A NAME="field_detail"><!-- --></A>
   <TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
      <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
         <TD COLSPAN=1><FONT SIZE="+2"><B>Field Detail</B></FONT></TD>
      </TR>
   </TABLE>

   
   <A NAME="oDbg"><!-- --></A>
   <H3>oDbg</H3>
   <PRE>Debugger&nbsp;<B>oDbg</B></PRE>
   <UL>
   Reference to debugger interface
(needs to implement method <code>log</code>)
   
   </UL>
   <HR>
   


<!-- ============ FIELD DETAIL END =========== -->

    <!-- ========= CONSTRUCTOR DETAIL START ======== -->

<A NAME="constructor_detail"><!-- --></A>
<TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
   <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
      <TD COLSPAN=1>
      <FONT SIZE="+2"><B>Constructor Detail</B></FONT>
      </TD>
   </TR>
</TABLE>

<A NAME="JSJaCConnection()"><!-- --></A><H3>
JSJaCConnection</H3>
<PRE><B>JSJaCConnection</B>(&lt;<a href="http://www.json.org/index.html">JSON</a>&gt; oArg)</PRE>


<UL>
   Creates a new Jabber connection (a connection to a jabber server)
</UL>



   <UL>
   <B>Parameters:</B>
   
     <UL><CODE>oArg</CODE> -  JSON with properties: <br>  * <code>httpbase</code> the http base address of the service to be used for  connecting to jabber<br>  * <code>oDbg</code> (optional) a reference to a debugger interface
     </UL>
   
   
   </UL>


<!-- Constructor return value(s) -->

<!-- End constructor return value(s) -->

<!-- ADDITIONAL ATTRIBUTES -->

<HR/>
<!-- END ADDITIONAL ATTRIBUTES  -->

<!-- ========= CONSTRUCTOR DETAIL END ======== -->


<!-- ============ METHOD DETAIL START ========== -->

<A NAME="method_detail"><!-- --></A>
<TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
   <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
      <TD COLSPAN=1><FONT SIZE="+2">
         <B>Method Detail</B></FONT>
      </TD>
   </TR>
</TABLE>

<!-- One single method detail entry -->

   <A NAME="connect"><!-- --></A>
   <H3>connect</H3>
   <PRE>void <B>connect</B>(oArg)</PRE>
   

   <!-- METHOD PARAMETERS START -->
   
   <!-- METHOD PARAMETERS END -->

   

   <!-- ADDITIONAL ATTRIBUTES START -->
   
   <!-- ADDITIONAL ATTRIBUTES  END -->
<HR>

   <A NAME="connected"><!-- --></A>
   <H3>connected</H3>
   <PRE>boolean <B>connected</B>()</PRE>
   
      <UL>Tells whether this connection is connected</UL>
   

   <!-- METHOD PARAMETERS START -->
   
   <!-- METHOD PARAMETERS END -->

   
   <UL>
   <B>Returns:</B>
        <UL>
        <code>true</code> if this connections is connected,  <code>false</code> otherwise   
        </UL>
   </UL>
   

   <!-- ADDITIONAL ATTRIBUTES START -->
   
   <!-- ADDITIONAL ATTRIBUTES  END -->
<HR>

   <A NAME="disconnect"><!-- --></A>
   <H3>disconnect</H3>
   <PRE>void <B>disconnect</B>()</PRE>
   
      <UL>Disconnects from jabber server and terminates session (if applicable)</UL>
   

   <!-- METHOD PARAMETERS START -->
   
   <!-- METHOD PARAMETERS END -->

   

   <!-- ADDITIONAL ATTRIBUTES START -->
   
   <!-- ADDITIONAL ATTRIBUTES  END -->
<HR>

   <A NAME="getPollInterval"><!-- --></A>
   <H3>getPollInterval</H3>
   <PRE>int <B>getPollInterval</B>()</PRE>
   
      <UL>Gets current value of polling interval</UL>
   

   <!-- METHOD PARAMETERS START -->
   
   <!-- METHOD PARAMETERS END -->

   
   <UL>
   <B>Returns:</B>
        <UL>
        Polling interval in milliseconds   
        </UL>
   </UL>
   

   <!-- ADDITIONAL ATTRIBUTES START -->
   
   <!-- ADDITIONAL ATTRIBUTES  END -->
<HR>

   <A NAME="registerHandler"><!-- --></A>
   <H3>registerHandler</H3>
   <PRE>void <B>registerHandler</B>(&lt;<a href="String.html">String</a>&gt; event)</PRE>
   
      <UL>Registers an event handler (callback) for this connection.
 <p>Note: All of the packet handlers for specific packets (like
 message_in, presence_in and iq_in) fire only if there's no
 callback associated with the id.<br>
 <p>Example:<br/>
 <code>con.registerHandler('iq', 'query', 'jabber:iq:version', handleIqVersion);</code></UL>
   

   <!-- METHOD PARAMETERS START -->
   
   <UL>
   <B>Parameters:</B>
   
     <UL><CODE>event</CODE> -  One of  <ul>  <li>onConnect - connection has been established and authenticated</li>  <li>onDisconnect - connection has been disconnected</li>  <li>onResume - connection has been resumed</li>  <li>onStatusChanged - connection status has changed, current  status as being passed argument to handler. See <a href="#status">status()</a>.</li>  <li>onError - an error has occured, error node is supplied as  argument, like this:<br><code>&lt;error code='404' type='cancel'&gt;<br>  &lt;item-not-found xmlns='urn:ietf:params:xml:ns:xmpp-stanzas'/&gt;<br>  &lt;/error&gt;</code></li>  <li>packet_in - a packet has been received (argument: the  packet)</li>  <li>packet_out - a packet is to be sent(argument: the  packet)</li>  <li>message_in | message - a message has been received (argument:  the packet)</li>  <li>message_out - a message packet is to be sent (argument: the  packet)</li>  <li>presence_in | presence - a presence has been received  (argument: the packet)</li>  <li>presence_out - a presence packet is to be sent (argument: the  packet)</li>  <li>iq_in | iq - an iq has been received (argument: the packet)</li>  <li>iq_out - an iq is to be sent (argument: the packet)</li>  </ul>  
      </UL> 
   
     <UL><CODE>childName</CODE> -  A childnode's name that must occur within a  retrieved packet [optional]  
      </UL> 
   
     <UL><CODE>childNS</CODE> -  A childnode's namespace that must occure within  a retrieved packet (works only if childName is given) [optional]  
      </UL> 
   
     <UL><CODE>type</CODE> -  The type of the packet to handle (works only if childName and chidNS are given (both may be set to '*' in order to get skipped) [optional]  
      </UL> 
   
     <UL><CODE>handler</CODE> -  The handler to be called when event occurs. If your handler returns 'true' it cancels bubbling of the event. No other registered handlers for this event will be fired.    
      </UL> 
   
   </UL>
   
   <!-- METHOD PARAMETERS END -->

   

   <!-- ADDITIONAL ATTRIBUTES START -->
   
   <!-- ADDITIONAL ATTRIBUTES  END -->
<HR>

   <A NAME="registerIQGet"><!-- --></A>
   <H3>registerIQGet</H3>
   <PRE>void <B>registerIQGet</B>(&lt;<a href="String.html">String</a>&gt; childName, &lt;<a href="String.html">String</a>&gt; childNS, &lt;Function&gt; handler)</PRE>
   
      <UL>Register for iq packets of type 'get'.</UL>
   

   <!-- METHOD PARAMETERS START -->
   
   <UL>
   <B>Parameters:</B>
   
     <UL><CODE>childName</CODE> -  A childnode's name that must occur within a  retrieved packet  
      </UL> 
   
     <UL><CODE>childNS</CODE> -  A childnode's namespace that must occure within  a retrieved packet (works only if childName is given)  
      </UL> 
   
     <UL><CODE>handler</CODE> -  The handler to be called when event occurs. If your handler returns 'true' it cancels bubbling of the event. No other registered handlers for this event will be fired.    
      </UL> 
   
   </UL>
   
   <!-- METHOD PARAMETERS END -->

   

   <!-- ADDITIONAL ATTRIBUTES START -->
   
   <!-- ADDITIONAL ATTRIBUTES  END -->
<HR>

   <A NAME="registerIQSet"><!-- --></A>
   <H3>registerIQSet</H3>
   <PRE>void <B>registerIQSet</B>(&lt;<a href="String.html">String</a>&gt; childName, &lt;<a href="String.html">String</a>&gt; childNS, &lt;Function&gt; handler)</PRE>
   
      <UL>Register for iq packets of type 'set'.</UL>
   

   <!-- METHOD PARAMETERS START -->
   
   <UL>
   <B>Parameters:</B>
   
     <UL><CODE>childName</CODE> -  A childnode's name that must occur within a  retrieved packet  
      </UL> 
   
     <UL><CODE>childNS</CODE> -  A childnode's namespace that must occure within  a retrieved packet (works only if childName is given)  
      </UL> 
   
     <UL><CODE>handler</CODE> -  The handler to be called when event occurs. If your handler returns 'true' it cancels bubbling of the event. No other registered handlers for this event will be fired.    
      </UL> 
   
   </UL>
   
   <!-- METHOD PARAMETERS END -->

   

   <!-- ADDITIONAL ATTRIBUTES START -->
   
   <!-- ADDITIONAL ATTRIBUTES  END -->
<HR>

   <A NAME="resume"><!-- --></A>
   <H3>resume</H3>
   <PRE>boolean <B>resume</B>()</PRE>
   
      <UL>Resumes this connection from saved state (cookie)</UL>
   

   <!-- METHOD PARAMETERS START -->
   
   <!-- METHOD PARAMETERS END -->

   
   <UL>
   <B>Returns:</B>
        <UL>
        Whether resume was successful   
        </UL>
   </UL>
   

   <!-- ADDITIONAL ATTRIBUTES START -->
   
   <!-- ADDITIONAL ATTRIBUTES  END -->
<HR>

   <A NAME="send"><!-- --></A>
   <H3>send</H3>
   <PRE>boolean <B>send</B>(&lt;<a href="JSJaCPacket.html">JSJaCPacket</a>&gt; packet,&lt;Function&gt; cb,&lt;Object&gt; arg)</PRE>
   
      <UL>Sends a JSJaCPacket</UL>
   

   <!-- METHOD PARAMETERS START -->
   
   <UL>
   <B>Parameters:</B>
   
     <UL><CODE>packet</CODE> -   The packet to send  
      </UL> 
   
     <UL><CODE>cb</CODE> -       The callback to be called if there's a reply  to this packet (identified by id) [optional]  
      </UL> 
   
     <UL><CODE>arg</CODE> -      Arguments passed to the callback  (additionally to the packet received) [optional]  
      </UL> 
   
   </UL>
   
   <!-- METHOD PARAMETERS END -->

   
   <UL>
   <B>Returns:</B>
        <UL>
        'true' if sending was successfull, 'false' otherwise   
        </UL>
   </UL>
   

   <!-- ADDITIONAL ATTRIBUTES START -->
   
   <!-- ADDITIONAL ATTRIBUTES  END -->
<HR>

   <A NAME="sendIQ"><!-- --></A>
   <H3>sendIQ</H3>
   <PRE>boolean <B>sendIQ</B>(&lt;JSJaCIQPacket&gt; iq, &lt;Object&gt; handlers, &lt;Object&gt; arg)</PRE>
   
      <UL>Sends an IQ packet. Has default handlers for each reply type.
 Those maybe overriden by passing an appropriate handler.</UL>
   

   <!-- METHOD PARAMETERS START -->
   
   <UL>
   <B>Parameters:</B>
   
     <UL><CODE>iq</CODE> -  - the iq packet to send  
      </UL> 
   
     <UL><CODE>handlers</CODE> -  - object with properties 'error_handler',                             'result_handler' and 'default_handler'                             with appropriate functions  
      </UL> 
   
     <UL><CODE>arg</CODE> -  - argument to handlers  
      </UL> 
   
   </UL>
   
   <!-- METHOD PARAMETERS END -->

   
   <UL>
   <B>Returns:</B>
        <UL>
        'true' if sending was successfull, 'false' otherwise   
        </UL>
   </UL>
   

   <!-- ADDITIONAL ATTRIBUTES START -->
   
   <!-- ADDITIONAL ATTRIBUTES  END -->
<HR>

   <A NAME="setPollInterval"><!-- --></A>
   <H3>setPollInterval</H3>
   <PRE>int <B>setPollInterval</B>(timerval)</PRE>
   
      <UL>Sets polling interval for this connection</UL>
   

   <!-- METHOD PARAMETERS START -->
   
   <UL>
   <B>Parameters:</B>
   
     <UL><CODE>millisecs</CODE> -  Milliseconds to set timer to  
      </UL> 
   
   </UL>
   
   <!-- METHOD PARAMETERS END -->

   
   <UL>
   <B>Returns:</B>
        <UL>
        effective interval this connection has been set to   
        </UL>
   </UL>
   

   <!-- ADDITIONAL ATTRIBUTES START -->
   
   <!-- ADDITIONAL ATTRIBUTES  END -->
<HR>

   <A NAME="status"><!-- --></A>
   <H3>status</H3>
   <PRE><a href="String.html">String</a> <B>status</B>()</PRE>
   
      <UL>Returns current status of this connection</UL>
   

   <!-- METHOD PARAMETERS START -->
   
   <!-- METHOD PARAMETERS END -->

   
   <UL>
   <B>Returns:</B>
        <UL>
        String to denote current state. One of  <ul>  <li>'initializing' ... well  <li>'connecting' if connect() was called  <li>'resuming' if resume() was called  <li>'processing' if it's about to operate as normal  <li>'onerror_fallback' if there was an error with the request object  <li>'protoerror_fallback' if there was an error at the http binding protocol flow (most likely that's where you interested in)  <li>'internal_server_error' in case of an internal server error  <li>'suspending' if suspend() is being called  <li>'aborted' if abort() was called  <li>'disconnecting' if disconnect() has been called  </ul>   
        </UL>
   </UL>
   

   <!-- ADDITIONAL ATTRIBUTES START -->
   
   <!-- ADDITIONAL ATTRIBUTES  END -->
<HR>

   <A NAME="suspend"><!-- --></A>
   <H3>suspend</H3>
   <PRE>void <B>suspend</B>()</PRE>
   
      <UL>Suspsends this connection (saving state for later resume)</UL>
   

   <!-- METHOD PARAMETERS START -->
   
   <!-- METHOD PARAMETERS END -->

   

   <!-- ADDITIONAL ATTRIBUTES START -->
   
   <!-- ADDITIONAL ATTRIBUTES  END -->
<HR>

   <A NAME="unregisterHandler"><!-- --></A>
   <H3>unregisterHandler</H3>
   <PRE>void <B>unregisterHandler</B>(event,handler)</PRE>
   

   <!-- METHOD PARAMETERS START -->
   
   <!-- METHOD PARAMETERS END -->

   

   <!-- ADDITIONAL ATTRIBUTES START -->
   
   <!-- ADDITIONAL ATTRIBUTES  END -->
<HR>



<!-- ============ METHOD DETAIL END ========== -->

<!-- ========= END OF CLASS DATA ========= -->

<!-- ========== START OF NAVBAR ========== -->
<A NAME="navbar_bottom"><!-- --></A>
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0">
<TR>
<TD COLSPAN=3 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
<A NAME="navbar_bottom_firstrow"><!-- --></A>
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3">
  <TR ALIGN="center" VALIGN="top">
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">  <A HREF="overview-summary-JSJaCConnection.js.html"><FONT CLASS="NavBarFont1"><B>File</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="overview-tree.html"><FONT CLASS="NavBarFont1"><b>Tree</b></FONT></A>&nbsp;</TD>
  <!--TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"-->    <!--A HREF="deprecated-list.html"--><!--FONT CLASS="NavBarFont1">Deprecated</FONT--><!--/A--><!--&nbsp;</TD-->
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
  </TR>
</TABLE>
</TD>
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
<B>JSJaC</B>
</EM>
</TD
</TR>

<TR>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
&nbsp;<A HREF="GLOBALS.html"><B>PREV CLASS</B></A><!-- 
   NEXT CLASS 
-->
&nbsp;<A HREF="JSJaCConsoleLogger.html"><B>NEXT CLASS</B></A></FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
  <A HREF="index.html" TARGET="_top"><B>FRAMES</B></A>  &nbsp;
&nbsp;<A HREF="" TARGET="_top"><B>NO FRAMES</B></A>  &nbsp;
&nbsp;
<SCRIPT>
  <!--
  if(window==top) {
    document.writeln('<A HREF="allclasses-noframe.html" TARGET=""><B>All Classes</B></A>');
  }
  //-->
</SCRIPT>
<NOSCRIPT>
<A HREF="allclasses-noframe.html" TARGET=""><B>All Classes</B></A>
</NOSCRIPT>
</FONT></TD>
</TR>
<TR>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
  SUMMARY:&nbsp;<A HREF="#field_summary">FIELD</A>&nbsp;|&nbsp;<A HREF="#constructor_summary">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
DETAIL:&nbsp;<A HREF="#field_detail">FIELD</A>&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>
</TR>
</TABLE>

<!-- =========== END OF NAVBAR =========== -->

<HR>
<FONT SIZE="-1">

</FONT>
<div class="jsdoc_ctime">Documentation generated by <a href="http://jsdoc.sourceforge.net/" target="_parent">JSDoc</a> on Tue Feb 12 18:46:55 2008</div>
</BODY>
</HTML>
